<template>
	<view class="SpecialLine-box" v-if="dataList">
		<view class="line-card" v-for="(item, index) in dataList" :key="index" @click="open(item)">
			<view class="line-card-img"><image mode="aspectFill" :src="item.img ? item.img.split(',')[0] : ''"></image></view>
			<view class="line-card-details">
				<view class="line-card-details-title u-line-2">{{ item.name }}</view>
				<view class="line-card-details-Subtitle u-line-2">{{ item.resume }}</view>
				<view class="line-card-details-price">
					<view class="details-price-left">
						<text class="price-left-icon">￥</text>
						<text class="price-left-price">{{ item.price }}</text>
						<text class="price-left-icon">起</text>
					</view>
					<view class="details-price-btn">立即预定</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props:{
		dataList:{
			type:Array,
			default:[]
		}
	},
	methods: {
		open(item) {
			this.$toProd({ ...item, prodType: 4 });
		}
	}
};
</script>

<style scoped lang="scss">
.SpecialLine-box {
	background-color: #fff;
	padding: 20rpx 30rpx 30rpx;
	.line-card {
		border-radius: 8rpx;
		box-shadow: 0px 4px 11px 2px rgba(153, 152, 152, 0.15);
		overflow: hidden;
		margin-bottom: 30rpx;
		&:last-of-type {
			margin-bottom: 0;
		}
	}
}
.line-card-img {
	width: 100%;
	height: 300rpx;
}
.line-card-details {
	padding: 10rpx 16rpx 24rpx;
}
.line-card-details-title {
	color: #333;
	font-size: 30rpx;
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.line-card-details-Subtitle {
	font-size: 26rpx;
	color: #666;
	margin-top: 8rpx;
}

.line-card-details-price {
	margin-top: 12rpx;
	display: flex;
	align-items: center;
	margin-top: 20rpx;
	.details-price-left {
		flex: 1;
		overflow: hidden;
		display: flex;
		align-items: center;
	}
	.price-left-icon {
		font-size: 24rpx;
		color: #ff1f00;
		font-family: PingFang SC;
	}
	.price-left-price {
		font-size: 36rpx;
		color: #ff1f00;
		margin: 0 4rpx;
		font-weight: bold;
		font-family: PingFang SC;
	}
	.details-price-btn {
		width: 140rpx;
		background-color: #f34d4e;
		color: #fff;
		font-size: 24rpx;
		line-height: 56rpx;
		text-align: center;
		border-radius: 8rpx;
	}
}
</style>
